package cn.sdhuijin.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 用户实体类
 * 
 * @author houyc
 *
 */
@Entity
@Table(name = "user")
public class User extends IdEntity implements Serializable {

	private static final long serialVersionUID = 1L;
	// 姓名
	private String name;
	// 性别
	private String sex;
	// 年龄
	private String age;
	// 所属机构Id
	@ManyToOne(fetch = FetchType.EAGER,cascade = { CascadeType.REFRESH })
	@JoinColumn(name = "branch_id")
	private Branch branch;
	// 邮箱
	private String email;
	// 手机
	private String telphone;
	// 业务类别区分(客户经理/网点业务员/贷款业务管理员/非贷款业务管理员)
	private String userType;
	// 密码
	private String password = "88888888";

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelphone() {
		return telphone;
	}

	public void setTelphone(String telphone) {
		this.telphone = telphone;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public Branch getBranch() {
		return branch;
	}

	public void setBranch(Branch branch) {
		this.branch = branch;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}
}
